﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Core.Xml.Ogc.Ows
{
    class CodeType : IXmlType
    {
        public string CodeSpace { get; set; }
        public String Value { get; set; }

        public XElement CreateXElement(XName elementName)
        {
            XElement code = new XElement(elementName);
            if (!string.IsNullOrEmpty(CodeSpace))
                code.Add(new XAttribute("codeSpace", CodeSpace));
            code.Add(new XText(Value));
            return code;
        }
    }
}
